namespace MBA.FluentExt.Ext
{
	public abstract class AdvancedComponent<T> : Observable<T>
		where T : ExtObject
	{
		#region Properties

		/// <summary>
		/// Fires when a component is added to an Ext.Container 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// ownerCt (Ext.Container): Container which holds the component 
		/// index (number): Position at which the component was added 
		/// </summary>
		public static Event Added
		{
			get { return new Event("added"); }
		}

		/// <summary>
		/// Fires after the component rendering is finished. The afterrender event is fired after this Component has been rendered, been postprocesed by any afterRender method defined for the Component, and, if stateful, after state has been restored. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event AfterRender
		{
			get { return new Event("afterrender"); }
		}

		/// <summary>
		/// Fires before the component is destroyed. Return false from an event handler to stop the destroy. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event BeforeDestroy
		{
			get { return new Event("beforedestroy"); }
		}

		/// <summary>
		/// Fires before the component is hidden by calling the hide method. Return false from an event handler to stop the hide. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event BeforeHide
		{
			get { return new Event("beforehide"); }
		}

		/// <summary>
		/// Fires before the component is rendered. Return false from an event handler to stop the render. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event BeforeRender
		{
			get { return new Event("beforerender"); }
		}

		/// <summary>
		/// Fires before the component is shown by calling the show method. Return false from an event handler to stop the show. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event BeforeShow
		{
			get { return new Event("beforeshow"); }
		}

		/// <summary>
		/// Fires before the state of the component is restored. Return false from an event handler to stop the restore. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// state (Object): The hash of state values returned from the StateProvider. If this event is not vetoed, then the state object is passed to applyState . By default, that simply copies property values into this Component. The method maybe overriden to provide custom state restoration. 
		/// </summary>
		public static Event BeforeStateRestore
		{
			get { return new Event("beforestaterestore"); }
		}

		/// <summary>
		/// Fires before the state of the component is saved to the configured state provider. Return false to stop the save. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// state (Object): The hash of state values. This is determined by calling getState() on the Component. This method must be provided by the developer to return whetever representation of state is required, by default, Ext.Component has a null implementation. 
		/// </summary>
		public static Event BeforeStateSave
		{
			get { return new Event("beforestatesave"); }
		}

		/// <summary>
		/// Fires after the component is destroyed. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event Destroy
		{
			get { return new Event("destroy"); }
		}

		/// <summary>
		/// Fires after the component is hidden. Fires after the component is hidden when calling the hide method. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event Hide
		{
			get { return new Event("hide"); }
		}

		/// <summary>
		/// Fires when a component is removed from an Ext.Container 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// ownerCt (Ext.Container): Container which holds the component 
		/// </summary>
		public static Event Removed
		{
			get { return new Event("removed"); }
		}

		/// <summary>
		/// Fires after the component markup is rendered. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event Render
		{
			get { return new Event("render"); }
		}

		/// <summary>
		/// Fires after the state of the component is restored. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// state (Object): The hash of state values returned from the StateProvider. This is passed to applyState . By default, that simply copies property values into this Component. The method maybe overriden to provide custom state restoration. 
		/// </summary>
		public static Event StateRestore
		{
			get { return new Event("staterestore"); }
		}

		/// <summary>
		/// Fires after the state of the component is saved to the configured state provider.
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// state (Object): The hash of state values. This is determined by calling getState() on the Component. This method must be provided by the developer to return whetever representation of state is required, by default, Ext.Component has a null implementation. 
		/// </summary>
		public static Event StateSave
		{
			get { return new Event("statesave"); }
		}

		#endregion Properties

		#region Methods

		/// <summary>
		/// Whether the component can move the Dom node when rendering (defaults to true). 
		/// </summary>
		public T AllowDomMove(bool allowDomMove)
		{
			return Config<T>("allowDomMove", allowDomMove);
		}

		/// <summary>
		/// Specify the id of the element, a DOM element or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. Description : When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Notes : When using this config, a call to render() is not required. If applyTo is specified, any value passed for renderTo will be ignored and the target element's parent node will automatically be used as the component's container. 
		/// </summary>
		public T ApplyTo(string applyTo)
		{
			return Config<T>("applyTo", applyTo);
		}

		/// <summary>
		/// Specify the id of the element, a DOM element or an existing Element corresponding to a DIV that is already present in the document that specifies some structural markup for this component. Description : When applyTo is used, constituent parts of the component can also be specified by id or CSS class name within the main element, and the component being created may attempt to create its subcomponents from that markup if applicable. Notes : When using this config, a call to render() is not required. If applyTo is specified, any value passed for renderTo will be ignored and the target element's parent node will automatically be used as the component's container. 
		/// </summary>
		public T ApplyTo(Raw applyTo)
		{
			return Config<T>("applyTo", applyTo);
		}

		/// <summary>
		/// A tag name or DomHelper spec used to create the Element which will encapsulate this Component. You do not normally need to specify this. For the base classes Ext.Component, Ext.BoxComponent, and Ext.Container, this defaults to 'div' . The more complex Ext classes use a more complex DOM structure created by their own onRender methods. This is intended to allow the developer to create application-specific utility Components encapsulated by different DOM elements. Example usage: { xtype: 'box', autoEl: { tag: 'img', src: 'http://www.example.com/example.jpg' } }, { xtype: 'box', autoEl: { tag: 'blockquote', html: 'autoEl is cool!' } }, { xtype: 'container', autoEl: 'ul', cls: 'ux-unordered-list', items: { xtype: 'box', autoEl: 'li', html: 'First list item' } } 
		/// </summary>
		public T AutoEl(string autoEl)
		{
			return Config<T>("autoEl", autoEl);
		}

		/// <summary>
		/// A tag name or DomHelper spec used to create the Element which will encapsulate this Component. You do not normally need to specify this. For the base classes Ext.Component, Ext.BoxComponent, and Ext.Container, this defaults to 'div' . The more complex Ext classes use a more complex DOM structure created by their own onRender methods. This is intended to allow the developer to create application-specific utility Components encapsulated by different DOM elements. Example usage: { xtype: 'box', autoEl: { tag: 'img', src: 'http://www.example.com/example.jpg' } }, { xtype: 'box', autoEl: { tag: 'blockquote', html: 'autoEl is cool!' } }, { xtype: 'container', autoEl: 'ul', cls: 'ux-unordered-list', items: { xtype: 'box', autoEl: 'li', html: 'First list item' } } 
		/// </summary>
		public T AutoEl(DomHelper autoEl)
		{
			return Config<T>("autoEl", autoEl);
		}

		/// <summary>
		/// True if the component should check for hidden classes (e.g. 'x-hidden' or 'x-hide-display') and remove them on render (defaults to false). 
		/// </summary>
		public T AutoShow(bool autoShow)
		{
			return Config<T>("autoShow", autoShow);
		}

		/// <summary>
		/// An array of events that, when fired, should be bubbled to any parent container. See Ext.util.Observable.enableBubble. Defaults to []. 
		/// </summary>
		public T BubbleEvents(params Event[] bubbleEvents)
		{
			return Config<T>("bubbleEvents", bubbleEvents);
		}

		/// <summary>
		/// The CSS class used to to apply to the special clearing div rendered directly after each form field wrapper to provide field clearing (defaults to 'x-form-clear-left'). Note: this config is only used when this Component is rendered by a Container which has been configured to use the FormLayout layout manager (e.g. Ext.form.FormPanel or specifying layout:'form') and either a fieldLabel is specified or isFormField=true is specified. See Ext.layout.FormLayout.fieldTpl also. 
		/// </summary>
		public T ClearCls(string clearCls)
		{
			return Config<T>("clearCls", clearCls);
		}

		/// <summary>
		/// An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for adding customized styles to the component or any of its children using standard CSS rules. 
		/// </summary>
		public T Cls(string cls)
		{
			return Config<T>("cls", cls);
		}

		/// <summary>
		/// Optional. Specify an existing HTML element, or the id of an existing HTML element to use as the content for this component. Description : This config option is used to take an existing HTML element and place it in the layout element of a new component (it simply moves the specified DOM element after the Component is rendered to use as the content. Notes : The specified HTML element is appended to the layout element of the component after any configured HTML has been inserted , and so the document will not contain this element at the time the render event is fired. The specified HTML element used will not participate in any layout scheme that the Component may use. It is just HTML. Layouts operate on child items . Add either the x-hidden or the x-hide-display CSS class to prevent a brief flicker of the content before it is rendered to the panel. 
		/// </summary>
		public T ContentEl(string contentEl)
		{
			return Config<T>("contentEl", contentEl);
		}

		/// <summary>
		/// An optional extra CSS class that will be added to this component's container. This can be useful for adding customized styles to the container or any of its children using standard CSS rules. See Ext.layout.ContainerLayout.extraCls also. Note: ctCls defaults to '' except for the following class which assigns a value by default: Box Layout : 'x-box-layout-ct' To configure the above Class with an extra CSS class append to the default. For example, for BoxLayout (Hbox and Vbox): ctCls: 'x-box-layout-ct custom-class' 
		/// </summary>
		public T CtCls(string ctCls)
		{
			return Config<T>("ctCls", ctCls);
		}

		/// <summary>
		/// The initial set of data to apply to the tpl to update the content area of the Component. 
		/// </summary>
		public T Data(object data)
		{
			return Config<T>("data", data);
		}

		/// <summary>
		/// CSS class added to the component when it is disabled (defaults to 'x-item-disabled'). 
		/// </summary>
		public T DisabledClass(string disabledClass)
		{
			return Config<T>("disabledClass", disabledClass);
		}

		/// <summary>
		/// Render this component hidden (default is false). If true, the hide method will be called internally. 
		/// </summary>
		public T Hidden(bool hidden)
		{
			return Config<T>("hidden", hidden);
		}

		/// <summary>
		/// true to completely hide the label element (label and separator). Defaults to false. By default, even if you do not specify a fieldLabel the space will still be reserved so that the field will line up with other fields that do have labels. Setting this to true will cause the field to not reserve that space. Note: see the note for clearCls . Example use: new Ext.FormPanel({ height: 100, renderTo: Ext.getBody(), items: [{ xtype: 'textfield' hideLabel: true }] }); 
		/// </summary>
		public T HideLabel(bool hideLabel)
		{
			return Config<T>("hideLabel", hideLabel);
		}

		/// <summary>
		/// How this component should be hidden. Supported values are 'visibility' (css visibility), 'offsets' (negative offset position) and 'display' (css display). Note: the default of 'display' is generally preferred since items are automatically laid out when they are first shown (no sizing is done while hidden). 
		/// </summary>
		public T HideMode(HideMode hideMode)
		{
			return Config<T>("hideMode", hideMode);
		}

		/// <summary>
		/// True to hide and show the component's container when hide/show is called on the component, false to hide and show the component itself (defaults to false). For example, this can be used as a shortcut for a hide button on a window by setting hide:true on the button when adding it to its parent container. 
		/// </summary>
		public T HideParent(bool hideParent)
		{
			return Config<T>("hideParent", hideParent);
		}

		/// <summary>
		/// An HTML fragment, or a DomHelper specification to use as the layout element content (defaults to ''). The HTML content is added after the component is rendered, so the document will not contain this HTML at the time the render event is fired. This content is inserted into the body before any configured contentEl is appended. 
		/// </summary>
		public T Html(string html)
		{
			return Config<T>("html", html);
		}

		/// <summary>
		/// An HTML fragment, or a DomHelper specification to use as the layout element content (defaults to ''). The HTML content is added after the component is rendered, so the document will not contain this HTML at the time the render event is fired. This content is inserted into the body before any configured contentEl is appended. 
		/// </summary>
		public T Html(DomHelper html)
		{
			return Config<T>("html", html);
		}

		/// <summary>
		/// Note: this config is only used when this Component is rendered by a Container which has been configured to use the FormLayout layout manager (e.g. Ext.form.FormPanel or specifying layout:'form'). An additional CSS class to apply to the div wrapping the form item element of this field. If supplied, itemCls at the field level will override the default itemCls supplied at the container level. The value specified for itemCls will be added to the default class ('x-form-item'). Since it is applied to the item wrapper (see Ext.layout.FormLayout.fieldTpl), it allows you to write standard CSS rules that can apply to the field, the label (if specified), or any other element within the markup for the field. Note: see the note for fieldLabel . Example use: // Apply a style to the field's label: <style> .required .x-form-item-label {font-weight:bold;color:red;} </style> new Ext.FormPanel({ height: 100, renderTo: Ext.getBody(), items: [{ xtype: 'textfield', fieldLabel: 'Name', itemCls: 'required' //this label will be styled },{ xtype: 'textfield', fieldLabel: 'Favorite Color' }] }); 
		/// </summary>
		public T ItemCls(string itemCls)
		{
			return Config<T>("itemCls", itemCls);
		}

		/// <summary>
		/// An itemId can be used as an alternative way to get a reference to a component when no object reference is available. Instead of using an id with Ext.getCmp, use itemId with Ext.Container.getComponent which will retrieve itemId's or id 's. Since itemId's are an index to the container's internal MixedCollection, the itemId is scoped locally to the container -- avoiding potential conflicts with Ext.ComponentMgr which requires a unique id . var c = new Ext.Panel({ // height: 300, renderTo: document.body, layout: 'auto', items: [ { itemId: 'p1', title: 'Panel 1', height: 150 }, { itemId: 'p2', title: 'Panel 2', height: 150 } ] }) p1 = c.getComponent('p1'); // not the same as Ext.getCmp() p2 = p1.ownerCt.getComponent('p2'); // reference via a sibling Also see id and ref . Note: to access the container of an item see ownerCt . 
		/// </summary>
		public T ItemId(string itemId)
		{
			return Config<T>("itemId", itemId);
		}

		/// <summary>
		/// The separator to display after the text of each fieldLabel . This property may be configured at various levels. The order of precedence is: field / component level container level layout level (defaults to colon ':') To display no separator for this field's label specify empty string ''. Note: see the note for clearCls . Also see hideLabel and Ext.layout.FormLayout.fieldTpl. Example use: new Ext.FormPanel({ height: 100, renderTo: Ext.getBody(), layoutConfig: { labelSeparator: '~' // layout config has lowest priority (defaults to ':') }, labelSeparator: '>>',   // config at container level items: [{ xtype: 'textfield', fieldLabel: 'Field 1', labelSeparator: '...' // field/component level config supersedes others },{ xtype: 'textfield', fieldLabel: 'Field 2' // labelSeparator will be '=' }] }); 
		/// </summary>
		public T LabelSeparator(string labelSeparator)
		{
			return Config<T>("labelSeparator", labelSeparator);
		}

		/// <summary>
		/// A CSS style specification string to apply directly to this field's label. Defaults to the container's labelStyle value if set (e.g., Ext.layout.FormLayout.labelStyle , or ''). Note: see the note for clearCls . Also see hideLabel and Ext.layout.FormLayout.fieldTpl. Example use: new Ext.FormPanel({ height: 100, renderTo: Ext.getBody(), items: [{ xtype: 'textfield', fieldLabel: 'Name', labelStyle: 'font-weight:bold;' }] }); 
		/// </summary>
		public T LabelStyle(string labelStyle)
		{
			return Config<T>("labelStyle", labelStyle);
		}

		/// <summary>
		/// An optional extra CSS class that will be added to this component's Element when the mouse moves over the Element, and removed when the mouse moves out. (defaults to ''). This can be useful for adding customized 'active' or 'hover' styles to the component or any of its children using standard CSS rules. 
		/// </summary>
		public T OverCls(string overCls)
		{
			return Config<T>("overCls", overCls);
		}

		/// <summary>
		/// An object or array of objects that will provide custom functionality for this component. The only requirement for a valid plugin is that it contain an init method that accepts a reference of type Ext.Component. When a component is created, if any plugins are available, the component will call the init method on each plugin, passing a reference to itself. Each plugin can then call methods or respond to events on the component as needed to provide its functionality. 
		/// </summary>
		public T Plugins(params IPlugin[] plugins)
		{
			return Config<T>("plugins", plugins);
		}

		/// <summary>
		/// The registered ptype to create. This config option is not used when passing a config object into a constructor. This config option is used only when lazy instantiation is being used, and a Plugin is being specified not as a fully instantiated Component, but as a Component config object . The ptype will be looked up at render time up to determine what type of Plugin to create. If you create your own Plugins, you may register them using Ext.ComponentMgr.registerPlugin in order to be able to take advantage of lazy instantiation and rendering. 
		/// </summary>
		public T Ptype(XType ptype)
		{
			return Config<T>("ptype", ptype);
		}

		/// <summary>
		/// A path specification, relative to the Component's ownerCt specifying into which ancestor Container to place a named reference to this Component. The ancestor axis can be traversed by using '/' characters in the path. For example, to put a reference to a Toolbar Button into the Panel which owns the Toolbar: var myGrid = new Ext.grid.EditorGridPanel({ title: 'My EditorGridPanel', store: myStore, colModel: myColModel, tbar: [{ text: 'Save', handler: saveChanges, disabled: true, ref: '../saveButton' }], listeners: { afteredit: function() { //     The button reference is in the GridPanel myGrid.saveButton.enable(); } } }); In the code above, if the ref had been 'saveButton' the reference would have been placed into the Toolbar. Each '/' in the ref moves up one level from the Component's ownerCt . Also see the added and removed events. 
		/// </summary>
		public T Ref(string @ref)
		{
			return Config<T>("ref", @ref);
		}

		/// <summary>
		/// Specify the id of the element, a DOM element or an existing Element that this component will be rendered into. Notes : Do not use this option if the Component is to be a child item of a Container. It is the responsibility of the Container's layout manager to render and manage its child items. When using this config, a call to render() is not required. See render also. 
		/// </summary>
		public T RenderTo(string renderTo)
		{
			return Config<T>("renderTo", renderTo);
		}

		/// <summary>
		/// Specify the id of the element, a DOM element or an existing Element that this component will be rendered into. Notes : Do not use this option if the Component is to be a child item of a Container. It is the responsibility of the Container's layout manager to render and manage its child items. When using this config, a call to render() is not required. See render also. 
		/// </summary>
		public T RenderTo(Raw renderTo)
		{
			return Config<T>("renderTo", renderTo);
		}

		/// <summary>
		/// An array of events that, when fired, should trigger this component to save its state (defaults to none). stateEvents may be any type of event supported by this component, including browser or custom events (e.g., ['click', 'customerchange']). See stateful for an explanation of saving and restoring Component state. 
		/// </summary>
		public T StateEvents(params Event[] stateEvents)
		{
			return Config<T>("stateEvents", stateEvents);
		}

		/// <summary>
		/// A flag which causes the Component to attempt to restore the state of internal properties from a saved state on startup. The component must have either a stateId or id assigned for state to be managed. Auto-generated ids are not guaranteed to be stable across page loads and cannot be relied upon to save and restore the same state for a component. For state saving to work, the state manager's provider must have been set to an implementation of Ext.state.Provider which overrides the set and get methods to save and recall name/value pairs. A built-in implementation, Ext.state.CookieProvider is available. To set the state provider for the current page: Ext.state.Manager.setProvider(new Ext.state.CookieProvider({ expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now })); A stateful Component attempts to save state when one of the events listed in the stateEvents configuration fires. To save state, a stateful Component first serializes its state by calling getState . By default, this function does nothing. The developer must provide an implementation which returns an object hash which represents the Component's restorable state. The value yielded by getState is passed to Ext.state.Manager.set which uses the configured Ext.state.Provider to save the object keyed by the Component's stateId , or, if that is not specified, its id . During construction, a stateful Component attempts to restore its state by calling Ext.state.Manager.get passing the stateId , or, if that is not specified, the id . The resulting object is passed to applyState . The default implementation of applyState simply copies properties into the object, but a developer may override this to support more behaviour. You can perform extra processing on state save and restore by attaching handlers to the beforestaterestore, staterestore, beforestatesave and statesave events. 
		/// </summary>
		public T Stateful(bool stateful)
		{
			return Config<T>("stateful", stateful);
		}

		/// <summary>
		/// The unique id for this component to use for state management purposes (defaults to the component id if one was set, otherwise null if the component is using a generated id). See stateful for an explanation of saving and restoring Component state. 
		/// </summary>
		public T StateId(string stateId)
		{
			return Config<T>("stateId", stateId);
		}

		/// <summary>
		/// A custom style specification to be applied to this component's Element. Should be a valid argument to Ext.Element.applyStyles. new Ext.Panel({ title: 'Some Title', renderTo: Ext.getBody(), width: 400, height: 300, layout: 'form', items: [{ xtype: 'textarea', style: { width: '95%', marginBottom: '10px' } }, new Ext.Button({ text: 'Send', minWidth: '100', style: { marginBottom: '10px' } }) ] }); 
		/// </summary>
		public T Style(string style)
		{
			return Config<T>("style", style);
		}

		public Component ToBasic()
		{
			return new Component { configDictionary = configDictionary };
		}

		/// <summary>
		/// An Ext.Template , Ext.XTemplate or an array of strings to form an Ext.XTemplate. Used in conjunction with the data and tplWriteMode configurations. 
		/// </summary>
		// TODO: Template object
		//public T Tpl(Template tpl)
		//{
		//	return Config<T>("tpl", tpl);
		//}
		/// <summary>
		/// The Ext.(X)Template method to use when updating the content area of the Component. Defaults to 'overwrite' (see Ext.XTemplate.overwrite ). 
		/// </summary>
		public T TplWriteMode(TemplateWriteMode tplWriteMode)
		{
			return Config<T>("tplWriteMode", tplWriteMode);
		}

		/// <summary>
		/// The registered xtype to create. This config option is not used when passing a config object into a constructor. This config option is used only when lazy instantiation is being used, and a child item of a Container is being specified not as a fully instantiated Component, but as a Component config object . The xtype will be looked up at render time up to determine what type of child Component to create. The predefined xtypes are listed here. If you subclass Components to create your own Components, you may register them using Ext.ComponentMgr.registerType in order to be able to take advantage of lazy instantiation and rendering. 
		/// </summary>
		public T Xtype(XType xtype)
		{
			return Config<T>("xtype", xtype);
		}

		#endregion Methods
	}

	public class AdvancedComponent : AdvancedComponent<AdvancedComponent>
	{
		protected override string ExtNamespace
		{
			get { return "Ext.Component"; }
		}
	}

	public abstract class Component<T> : Observable<T>
		where T : ExtObject
	{
		#region Properties

		/// <summary>
		/// Fires after the component is disabled. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event Disable
		{
			get { return new Event("disable"); }
		}

		/// <summary>
		/// Fires after the component is enabled. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event Enable
		{
			get { return new Event("enable"); }
		}

		/// <summary>
		/// Fires after the component is shown when calling the show method. 
		/// Javascript function arguments:
		/// this (Ext.Component): 
		/// </summary>
		public static Event Show
		{
			get { return new Event("show"); }
		}

		#endregion Properties

		#region Methods

		/// <summary>
		/// Render this component disabled (default is false). 
		/// </summary>
		public T Disabled(bool disabled)
		{
			return Config<T>("disabled", disabled);
		}

		/// <summary>
		/// The label text to display next to this Component (defaults to ''). Note: this config is only used when this Component is rendered by a Container which has been configured to use the FormLayout layout manager (e.g. Ext.form.FormPanel or specifying layout:'form'). Also see hideLabel and Ext.layout.FormLayout.fieldTpl. Example use: new Ext.FormPanel({ height: 100, renderTo: Ext.getBody(), items: [{ xtype: 'textfield', fieldLabel: 'Name' }] }); 
		/// </summary>
		public T FieldLabel(string fieldLabel)
		{
			return Config<T>("fieldLabel", fieldLabel);
		}

		/// <summary>
		/// The unique id of this component (defaults to an auto-assigned id). You should assign an id if you need to be able to access the component later and you do not have an object reference available (e.g., using Ext.getCmp). Note that this id will also be used as the element id for the containing HTML element that is rendered to the page for this component. This allows you to write id-based CSS rules to style the specific instance of this component uniquely, and also to select sub-elements using this component's id as the parent. Note: to avoid complications imposed by a unique id also see itemId and ref . Note: to access the container of an item see ownerCt . 
		/// </summary>
		public T Id(string id)
		{
			return Config<T>("id", id);
		}

		public AdvancedComponent ToAdvanced()
		{
			return new AdvancedComponent {configDictionary = configDictionary};
		}

		#endregion Methods
	}

	public class Component : Component<Component>
	{

		protected override string ExtNamespace
		{
			get { return "Ext.Component"; }
		}

	}
}